package com.lxl.dao;

import com.lxl.entity.User;

import javax.servlet.jsp.jstl.sql.Result;
import java.sql.SQLException;
import java.util.List;

/**
 * @author 北上寻海
 */
public interface IDao {
    /**
     * 添加用户
     *
     * @param user 待添加的对象的数据
     * @return 成功与否
     */
    default int addUser(User user) throws SQLException {
        return 0;
    }

    default Result findById(Object[] params) throws SQLException {
        return null;
    }

    default Result findAll() throws SQLException {
        return null;
    }

    default int deleteUserById(int id) throws SQLException {
        return 0;
    }

    default int updateUserById(Object[] params) throws SQLException {
        return 0;
    }

    default Result verify(String name , String password) throws SQLException {
        return null;
    }
}
